package userManage

import (
	"main/src/utils"
	"time"
)

var UserRoute = utils.Routes{
	BaseUrl: "user",
	Routes: []*utils.Route{
		{
			Path:   "/login",
			Method: "POST",
			View:   Login,
			Body: LoginDto{
				Username: "",
				Password: "",
			},
			ResponseJson: LoginResponseDto{
				Token:    "",
				Username: "",
				IsSuper:  false,
			},
		},
		{
			Path:   "/create",
			Method: "POST",
			View:   CreateUser,
			Body: CreateUserDto{
				Username: "",
				Password: "",
			},
			ResponseJson: nil,
		},
		{
			Path:   "/delete",
			Method: "POST",
			View:   DeleteUser,
			Body: DeleteUserDto{
				Id: 0,
			},
			ResponseJson: nil,
		},
		{
			Path:   "/update/back_up",
			Method: "POST",
			View:   UpdateBackUp,
			Body: BackUpUserDto{
				Id:       0,
				IsBackUp: false,
			},
			ResponseJson: UserInfoResponseDto{
				Id:        0,
				Username:  "",
				IsBackUp:  false,
				CreatedAt: time.Time{},
				UpdatedAt: time.Time{},
			},
		},
		{
			Path:   "/update/is_super",
			Method: "POST",
			View:   SetSuperUser,
			Body: SetSuperDto{
				Id:      0,
				IsSuper: false,
			},
			ResponseJson: UserInfoResponseDto{
				Id:        0,
				Username:  "",
				IsBackUp:  false,
				CreatedAt: time.Time{},
				UpdatedAt: time.Time{},
			},
		},
		{
			Path:   "/update/password",
			Method: "POST",
			View:   EditPassword,
			Body: EditPasswordDto{
				Id:       0,
				Password: "",
			},
			ResponseJson: nil,
		},
		{
			Path:   "/get",
			Method: "POST",
			View:   GetUser,
			Body: GetUserDto{
				GetDataLimitDto: utils.GetDataLimitDto{
					PageNum:  0,
					PageSize: 0,
				},
				Username: "",
			},
			ResponseJson: utils.GetDataLimitResponseDto{
				Total:        0,
				Page:         0,
				NextPage:     0,
				PreviousPage: 0,
				Data: []UserInfoResponseDto{
					{
						Id:        0,
						Username:  "",
						IsBackUp:  false,
						CreatedAt: time.Time{},
						UpdatedAt: time.Time{},
					},
				},
			},
		},
	},
}
